package com.aspose.cells;

import java.awt.Dimension;
import java.awt.Point;
import java.awt.Rectangle;
import java.io.OutputStream;

class zam extends com.aspose.cells.a.d.zat {
   public void a(com.aspose.cells.a.d.zm var1, OutputStream var2) throws Exception {
      this.a(var1, var2, 0.0F, 0.0F, 1.0F);
   }

   public void a(com.aspose.cells.a.d.zm var1, OutputStream var2, float var3, float var4, float var5) throws Exception {
      this.a(var1, var2, var3, var4, var5, var5);
   }

   public void a(com.aspose.cells.a.d.zm var1, OutputStream var2, float var3, float var4, float var5, float var6) throws Exception {
      Dimension var7 = new Dimension(1024, 768);
      Dimension var8 = new Dimension(271, 203);
      int var9 = (int)((float)this.b(var1.b(), var7, var8) * var5);
      int var10 = (int)((float)this.a(var1.c(), var7, var8) * var6);
      Rectangle var11 = new Rectangle((int)var3, (int)var4, var9, var10);
      com.aspose.cells.a.d.a.zj var12 = new com.aspose.cells.a.d.a.zj(var11, var7, var8, new com.aspose.cells.a.d.a.zk());
      var12.d(24);
      var12.a(1);
      var12.b(13);
      var12.e(1);
      var12.c(3);
      new Point(var11.x, var11.y);
      com.aspose.cells.a.d.a.zc var14 = var12.a();
      if (var1 == null) {
         throw new Exception("ArgumentNull node");
      } else {
         super.a(var1, var14, var3, var4, var5, var6);
         var12.a(var2);
      }
   }

   private int a(float var1, Dimension var2, Dimension var3) {
      return (int)Math.round((double)var1 * 25.4D / 72.0D * var2.getHeight() / var3.getHeight());
   }

   private int b(float var1, Dimension var2, Dimension var3) {
      return (int)Math.round((double)var1 * 25.4D / 72.0D * var2.getWidth() / var3.getWidth());
   }
}
